package com.cxl.springboot.util;

import lombok.Data;

import java.util.HashMap;

@Data
public class result {
    public Object data;
    public status status;
    public result(Object data,int code){
        HashMap<String, Object> map = new HashMap<>();
        status status = new status();
        switch (code){
            case 0:
            case 1:
            case 2:
            case 3:  status.setCode(code);status.setDesc("成功");break;
            case 100:  status.setCode(code);status.setDesc("jwt失效");break;
            default:status.setCode(-1);status.setDesc("出错拉");
        }
//        map.put("data",data);
//        map.put("status",status);
        this.data = data;
        this.status = status;
    }
}
